<template>
  <div id="p_taskone" class="p_task">
    <div style="width: 100%; overflow:scroll;-webkit-overflow-scrolling:touch;position:fixed;left:0;top:0;z-index:1;">
        <tab v-model="sindex" :line-width="1">
            <tab-item @on-item-click="$router.push('/n_taskone/index')" :selected="$route.path=='/n_taskone/index'">日程任务</tab-item>
            <tab-item @on-item-click="$router.push('/n_taskone/habit')" :selected="$route.path=='/n_taskone/habit'">习惯养成</tab-item>
            <tab-item @on-item-click="$router.push('/n_taskone/taskmd')" :selected="$route.path=='/n_taskone/taskmd'">日报分析</tab-item>
        </tab>
    </div>
    <div style="height:44px;"></div>
    <router-view ref="taskRouter" class="view" keep-alive></router-view>
  </div>
</template>
<script>

import {
    Tab,TabItem,Toast
} from 'vux'

export default {
    components: {        
        Tab,TabItem,Toast
    },   
    
    data() {
        return {
            sindex:0
        }
    }
}

</script>
<style scoped>

.day-item {
  border: 1px solid #ececec;
  padding: 5px 15px;
}
.day-item-selected {
  border: 1px solid green;
}
</style>
<style>

#p_none .weui-search-bar:before {
    height: 0;
    border-top: 0;
}
#p_none .vux-tab {
    padding:2px 6px ;
    height: 32px;
}
#p_none .vux-tab .vux-tab-item{
    background: #fff;
    line-height: 28px;    font-size: 16px;
}
#p_none .vux-tab .vux-tab-selected {
    background: rgba(0, 169, 255, 0.24);border-radius: 6px;
}
#p_none .vux-tab .next {
    background: rgba(238, 238, 238, 0.7);
}

#p_none .timeBtn{width:180px;padding-left: 4px;background-color: #fff;padding-top: 2px;}
#p_none .timeBtn  > a { height: 28px; line-height: 28px; }

</style>
